]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
window tracker: Adapt to renamed function
authorBilal Elmoussaoui <belmouss@redhat.com>
Wed, 31 Jan 2024 15:12:59 +0000 (16:12 +0100)
committerBilal Elmoussaoui <belmouss@redhat.com>
Thu, 8 Feb 2024 15:45:06 +0000 (16:45 +0100)
Ideally, the use case we have for MetaGroup would be removed but that
requires investigation that could be done as a future step

The function also expects a MetaWindowX11, so add a check to ensure
we don't crash at runtime if the function gets called on a wayland
client

Also removes an unused header import

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3157>

src/shell-app-usage.c
src/shell-window-tracker.c

index aaaabd9892633798e1ddf4282609930f53896f0b..ad40040d9c72833484be57493acb0487dc99c9ed 100644 (file)
@@ -10,7 +10,6 @@
 #include <glib.h>
 #include <gio/gio.h>
 #include <meta/display.h>
-#include <meta/group.h>
 #include <meta/window.h>
 
 #include "shell-app-usage.h"
index 6a7240e47438fe3e844005d7ab281786b25392b5..2e3e2dae5d8e68b0b8199d28dc89d2e3948d4375 100644 (file)
@@ -313,7 +313,7 @@ get_app_from_window_group (ShellWindowTracker  *tracker,
   MetaGroup *group;
   GSList *iter;
 
-  group = meta_window_get_group (window);
+  group = meta_window_x11_get_group (window);
   if (group == NULL)
     return NULL;
 
@@ -463,7 +463,7 @@ get_app_for_window (ShellWindowTracker    *tracker,
   /* If we didn't get a startup-notification match, see if we matched
    * any other windows in the group.
    */
-  if (result == NULL)
+  if (result == NULL && meta_window_get_client_type (window) == META_WINDOW_CLIENT_TYPE_X11)
     result = get_app_from_window_group (tracker, window);
 
   /* Our last resort - we create a fake app from the window */